package com.jic.member.constant.enums;

/**
 * @author MJ
 * @date: 2020/06/08
 */
public enum MessageTypeEnum {

    SMS_SEND(1, "短信"),
    WECHAT_PUSH(2, "微信公众号"),
    MAIL_SEND(3, "邮件"),
    APP_PUSH(4, "App push");

    private Integer code;

    private String message;

    MessageTypeEnum(Integer code, String message){
        this.code = code;
        this.message = message;
    }

    public MessageTypeEnum getByCode(Integer code){
        MessageTypeEnum[] values = MessageTypeEnum.values();
        for(MessageTypeEnum value : values){
            if(value.getCode().equals(code)){
                return value;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

}
